package com.sanqi.work.mongodomain;

import java.util.Date;
import java.util.Map;

import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.FieldType;

import com.fasterxml.jackson.annotation.JsonFormat;

import lombok.Data;

@Data
@Document(collection = "wx_file_excel_info")
public class WorkExcelInfo {
    @Id
    private String id;
    
    @Field(name = "sheet_name", targetType = FieldType.STRING)
    private String sheetName;
    
    @Field(name = "file_id", targetType = FieldType.STRING)
    private String fileId;
    
    @Field(name = "user_id", targetType = FieldType.STRING)
    private String userId;
    
    @Field("create_time")
    @JsonFormat(locale = "zh", timezone = "Asia/Shanghai", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    
    @Field("info_date")
    @JsonFormat(locale = "zh", timezone = "Asia/Shanghai", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date infoDate;
    
    @Field("update_time")
    @JsonFormat(locale = "zh", timezone = "Asia/Shanghai", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    
    @Field(name = "row_info", targetType = FieldType.IMPLICIT)
    private Map<String, Object> rowInfo;
}
